{config_load file=info.conf section="links"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{include file="favicon.tpl"}
<title>{#title#}</title>
{#css_style#}{#js_query#}{#js_getday#}
</head>
<body>
{include file="head.tpl"}
<div class="waps">
       <div class="con">     
            <div  class="nopa">
            	<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
                    <div class="pbox">
						{include file="bl_left.tpl"}
						<div class="ls_rbox">
							<div class="am_title"><span class="lsfonts_r">发布信息</span></div>
							<div class="seters">
                                <div class="step_set">
                                	<div class="step_title"></div>
                                    <div  class="jcsz">
                                    <table class="seteptb">
										<tr>
                                        	<td  class="step_rulname" valign="middle">标 题:</td>
                                          	<td class="step_rultxt" valign="middle">
                                            	<input  id="btitle" class="step_txt" type="text" style="width:260px;" value="{if $rule.title}{$rule.title}{/if}"/>
                                            </td>
                                        </tr>
                                        <tr>
                                        	<td  class="step_rulname" valign="middle">有效期:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	<input id="st" class="step_txt" type="text" style=" cursor:pointer;width:160px;" value="{$rule.valid|date_format:'%Y-%m-%d'}" onclick="SelectDate(this,'yyyy\-MM\-dd')" readonly="readonly"/>
                                               	<img class="timebz"  src="../images/timebg.png"  onclick="SelectDate(document.getElementById('st'),'yyyy\-MM\-dd')"/>
                                            	<span class="step_remark"></span>
                                            </td>
                                       </tr>
										<tr>
                                        	<td  class="step_rulname" valign="top">内 容:</td>
                                            <td class="step_rultxt" valign="top">
                                            	<textarea id="bcontent" class="step_textarea" style="width:600px; height:200px;" >{if $rule.content}{$rule.content}{/if}</textarea>
                                            </td>
                                        </tr>
{if $user.nick=="admin"}                                       
                                        <tr>
                                        	<td  class="step_rulname" valign="top">发布人:</td>
                                            <td class="step_rultxt" valign="top">{if $rule.creater}{$rule.creater}{/if}</td>
                                        </tr>
                                        <tr>
                                        	<td  class="step_rulname" valign="middle">审核情况:</td>
                                            <td class="step_rultxt" valign="middle">
                                            	<input type="radio" name="s" id="s1" value="true" {if $rule.status=="true"}checked=""{/if}/><label for="s1"> 审核通过</label>
                                            	<input type="radio" name="s" id="s2" value="false" {if $rule.status=="false"}checked=""{/if}/><label for="s2"> 审核不通过</label>
                                            	- 原因：<input id="error" type="text"  class="step_txt" maxlength="20"  style="width:405px;" value="{$rule.sremark}"/>
                                            	<span class="step_remark"></span>
                                            </td>
                                       </tr>
{/if}                                      
                                     </table>
                                    </div>
                                    <table class="next_step" align="center">
									<tr>
										<td><a href="javascript:modify('{$rule.id}');"><div class="next_btn">完 成</div></a></td> 
										<td><a href="bl_list.php"><span>返回列表</span></a></td> 
									</tr>
									</table>
                                </div>
                            </div>
						</div>
						<!--右框架结束-->
					<div class="clear"></div>
</div></div></div></div>
<div id="test"></div>
	{include file="foot.tpl"}
{literal}<script type="text/javascript">
function modify(id){
	var title=encodeURIComponent($.trim($("#btitle").attr("value")));
	var content=encodeURIComponent($.trim($("#bcontent").attr("value")));
	var valid=encodeURIComponent($.trim($("#st").attr("value")));
	
	var status=$("input[name=s][checked=='']").attr("value");
	var error=encodeURIComponent($.trim($("#error").attr("value")));
	
	if (!title || !content ||!valid){alert("请检查输入标题、有效期、内容均不为空！");return;}
	var params ={act:"modify",t:title,c:content,v:valid,i:id,s:status,e:error};
	$.post('bl_set.php',params,function(data) {
		//$("#test").html(data);
		if (data>0){history.back();}else{alert(data);}
	});
}
</script>{/literal}
</body>
</html>